package dht;

import java.io.Serializable;

enum Status {

    Worked, InvalidRangeError, WriteError;
}

public class Query {

    public Query() {

    }
}

class PutRequest extends Query implements Serializable {

    Star star;

    // for Serializable
    private PutRequest() {  }
    
    public PutRequest(Star s) {
        star = s;
    }
}

class GetRequest extends Query implements Serializable {

    String type;
    String compare;
    double value;

    // for serializable
    private GetRequest() { }
    
    public GetRequest(String type, String compare, double value) {
        this.type = type;
        this.compare = compare;
        this.value = value;
    }
}

class PutResponse extends Query implements Serializable {

    Status c;
    
    // for Serializable
    private PutResponse() {  }
    
    public PutResponse(Status c) {
        this.c = c;
    }
}

class GetResponse extends Query implements Serializable {

    String response;

    // for Serializable
    private GetResponse() { }
    
    public GetResponse(String response) {
        this.response = response;
    }
}